<template>
  <div>
    <el-dialog title="提示" :visible.sync="dialogVisible" width="30%" :before-close="handleClose">
      <span>这是一段信息</span>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
      </span>
    </el-dialog>
    <button @click="dialogVisible = true">dialog</button>
  </div>
</template>

<script>
export default {
  data () {
    return {
      dialogVisible: false
    };
  },
  created () { },
  computed: {},
  mounted () { },
  methods: {}
};
</script>
<style>
/* @import url(); 引入css类 */
/**dialog css */

.el-dialog {
  border-radius: 5px;
  text-align: left;
}

.el-dialog__title {
  line-height: 24px;
  font-size: 18px;
  color: #ffff !important;
}

.el-dialog__body {
  padding: 20px 20px;
  color: #606266;
  font-size: 14px;
  word-break: break-all;
}

.el-dialog__header {
  padding: 10px 20px;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  /*  从左到右的垂直渐变 #1268a5; */
  background: linear-gradient(to right, #1268a5, #ccf3de);
}

.el-dialog__headerbtn .el-dialog__close {
  color: #05276d;
}

.el-dialog__headerbtn {
  position: absolute;
  top: 14px;
  right: 20px;
  padding: 0;
  background: 0 0;
  border: none;
  outline: 0;
  cursor: pointer;
  font-size: 16px;
}
</style>